package command;

/**
 * @Author: Ma JiBin
 * @Email: 1423553596@qq.com
 * @Date: 2018/9/11 14:25
 * @Description: 命令模式（Command Pattern）
 */
public class Main {
    public static void main(String[] args) {
        Broker broker = new Broker();
        Stock stock = new Stock();
        Order buyOrder = new BuyStock(stock);
        Order sellOrder = new SellStock(stock);
        broker.takeOrder(buyOrder);
        broker.takeOrder(sellOrder);
        broker.placeOrders();
    }
}
